package cn.com.dal.dao.impl;

import java.util.HashMap;

import org.springframework.stereotype.Repository;

import cn.com.dal.dao.VerifyDAO;
import cn.com.dal.dataobject.VerifyDO;
import cn.com.support.dal.DAOException;
import cn.com.support.dal.DefaultDAO;

@Repository
public class VerifyDAOImpl<T extends VerifyDO> extends DefaultDAO<T> implements
		VerifyDAO<T> {

	@Override
	protected String getSatementPackage() {
		return "cn.com.dal.dao.VerifyDAO";
	}

	@Override
	public Long selectNeedVerifyTotalCount(String userName)
			throws DAOException {
		try {
			return getSqlSession().selectOne(
					getSatementPackage() + ".selectNeedVerifyTotalCount",
					userName);
		} catch (Exception e) {
			throw new DAOException(e);
		}
	}

	@Override
	public Long selectVerifingTotalCount(HashMap<Object, Object> params) throws DAOException {
		try {
			return getSqlSession().selectOne(
					getSatementPackage() + ".selectVerifingTotalCount",
					params);
		} catch (Exception e) {
			throw new DAOException(e);
		}

	}

}
